﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static T.Materials.Domain.Enum.Enums;

namespace T.Materials.Domain.Dto
{
    /// <summary>
    /// 物资入库DTO
    /// </summary>
    public class MaterialStoreDto
    {
        /// <summary>
        /// 物资与入库ID
        /// </summary>
        [Key]
        public int MaterialStoreId { get; set; }

        /// <summary>
        /// 公司ID全球唯一标识符
        /// </summary>
        public string? CompanyID { get; set; }

        /// <summary>
        /// 用户ID
        /// </summary>
        public int User_Id { get; set; }

        /// <summary>
        /// 货物名称
        /// </summary>
        public string? NameOfGoods { get; set; }

        /// <summary>
        /// 类型
        /// </summary>
        public string? MaterialStoreType { get; set; }

        /// <summary>
        /// 材质
        /// </summary>
        public string? Material { get; set; }

        /// <summary>
        /// 规格
        /// </summary>
        public string? Specifications { get; set; }

        /// <summary>
        /// 仓库数量
        /// </summary>
        public int Number { get; set; }

        /// <summary>
        /// 总数量
        /// </summary>
        public int TotalNumber { get; set; }

        /// <summary>
        /// 期望交付日期
        /// </summary>
        public DateTime? DeliveryDate { get; set; }

        /// <summary>
        /// 用途描述
        /// </summary>
        public string? UsageDescription { get; set; }

        /// <summary>
        /// 申请人/登记人
        /// </summary>
        public string? Applicant { get; set; }

        /// <summary>
        /// 审批状态
        /// </summary>
        public ApprovalStatus ApprovalStatus { get; set; }

        /// <summary>
        /// 审批人
        /// </summary>
        public string? Approver { get; set; }

        /// <summary>
        /// 登记人
        /// </summary>
        public string? Registrant { get; set; }

        /// <summary>
        /// 支付方式
        /// </summary>
        public string? PaymentMethod { get; set; }

        /// <summary>
        /// 其他支付方式
        /// </summary>
        public string? OtherPaymentMethods { get; set; }

        /// <summary>
        /// 单价
        /// </summary>
        public decimal? UnitPrice { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Notes { get; set; }

        /// <summary>
        /// 转批人
        /// </summary>
        public string? Subgrantor { get; set; }

        /// <summary>
        /// 物资分类(1、采购 2、入库)
        /// </summary>
        public int? MaterialClassificat { get; set; }

        /// <summary>
        /// 国家
        /// </summary>
        public int CountryId { get; set; }

        /// <summary>
        /// 国家名称
        /// </summary>
        public string? CountryName { get; set; }

        /// <summary>
        /// 省/州
        /// </summary>
        public int EconomizeId { get; set; }

        /// <summary>
        /// 省/州名称
        /// </summary>
        public string? EconomizeName { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public string? CreatedBy { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreatedDate { get; set; } = DateTime.Now;

        /// <summary>
        /// 修改人
        /// </summary>
        public string? UpdatedBy { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? UpdatedDate { get; set; }

        /// <summary>
        /// 删除人
        /// </summary>
        public string? DeletedBy { get; set; }

        /// <summary>
        /// 删除时间
        /// </summary>
        public DateTime? DeletedDate { get; set; }

        /// <summary>
        /// 逻辑状态
        /// </summary>
        public bool IsDeleted { get; set; } = false;

        /// <summary>
        /// 存储物资领用主键
        /// </summary>
        public int StorageMaterialsId { get; set; }

        /// <summary>
        /// 物资领用ID
        /// </summary>
        public int MaterialRequisitionId { get; set; }

        /// <summary>
        /// 领用数量
        /// </summary>
        public int QuantityReceived { get; set; }

        /// <summary>
        /// 期间结余数量
        /// </summary>
        public int BalanceQuantity { get; set; }
    }
}
